1. Field of the Invention
The present invention relates to processor synchronization, and more particularly to clock-synchronization in distributed systems.
2. Discussion of Related Art
Quartz crystals are known to provide accurate and constant clocks for electronic equipment. For this reason they are widely used in relatively inexpensive electronic equipment such as PCs, mobile phones, wrist watches, etc. Typically, quartz crystals are grown synthetically. The frequency of a quartz crystal is determined by its thickness, d, according to:
                              f          ⁡                      [            kHz            ]                          =                              N            ⁡                          [                              kHz                *                mm                            ]                                            d            ⁡                          [              mm              ]                                                          Equation        ⁢                                  ⁢        1            
For the most common AT-cut, the constant N is N=1660 kHz*mm. AT specifies a specific plane relative to the crystal axes of the quartz. The frequency ranges from 800 khz up to 360 Mhz, and the fundamental frequency ranges up to about 40 Mhz.
The advantage of the AT-cut in comparison to other cuts is that the resonance frequency of the AT-cut is substantially independent of temperature. It follows a third grade equation (see FIG. 1, and Equation 2) with a turning point, according to the form of the quartz and frequency at 25 to 30 degrees Celsius.
                                          Δ            ⁢                                                  ⁢            f                    f                =                                            a              1                        ⁡                          (                              T                -                                  T                  inv                                            )                                +                                                    a                3                            ⁡                              (                                  T                  -                                      T                    inv                                                  )                                      3                                              Equation        ⁢                                  ⁢        2            with a3=1.05·10−4                 a1=0.0085·Δφ        Δφ=φzz−φ0 in angle minutes,        
      Δ    ⁢                  ⁢    f    fin ppm and T, Tinv in degrees Celsius.
The gradient in the turning point is determined by the cut angle φzz. Δφ is the difference between the zero angle φ0 at which the curve has a horizontal tangent in its turning point (see FIG. 1).
There are two main sources of frequency inaccuracies for commercial quartz oscillators: manufacturing inaccuracies and thermal effects. Manufacturing inaccuracies result from the finite mechanical accuracy of quartz thickness, as can be seen from Equation 1, and accuracy of the cut angle (see Equation 2) which can only be adjusted to 10 angle minutes. Inexpensive quartz oscillators have a typical relative accuracy better than +/−10−4, which is adequate in most cases. As an example, most ITU modem recommendations specify a clock accuracy of +/−10−4. In inexpensive equipment, this is the main source of frequency offset.
As shown in FIG. 1, additionally the quartz frequency depends on the temperature of the environment. In a room temperature environment of 15° C. . . . 25° C., the thermal inaccuracy of quartz oscillators is insignificant compared to manufacturing inaccuracy. Further, there are still other reasons for frequency inaccuracies of quartz oscillators such as long term drift and phase noise. However, these inaccuracies are typically negligible compared to the above effects.
There are many ways to improve the accuracy of oscillators, such as parallel adjustable capacitors or mounting in a temperature regulated housing. However, oscillators in standard PCs do not use such sophisticated techniques to limit complexity and costs.
One area where clock inaccuracies can be particularly troublesome is in distributed computing. The clocks of different processors need to be synchronized to limit errors. Synchronization can be a particularly difficult problem. For example, if the clocks of collaborative video discussion participants' are to be synchronized to a desirable level, e.g., up to 30 ms, it is not enough to adjust local clocks only at the beginning of a collaborative video discussion session. The clocks need to be monitored and adjusted continuously. Otherwise, the clocks will drift apart because of, for example, temperature drift, aging and the mechanical accuracy at which the frequency can be set by cutting. The drift rate is the deviation from the Coordinated Universal Time (UTC), divided by the time T, the measuring period.
One approach to distributed clock synchronization was reported by Flaviu in 1989 in his article “Probabilistic Clock Synchronization”, which is the basis for many synchronization algorithms. It is called probabilistic, because in the approach it is not guaranteed that a client can always read the clock of a server with an a-priori defined precision. By means of several successive reading attempts, the client is able to synchronize onto the server's clock with an adjustable precision, and with a probability of success which is also adjustable via a maximum number of allowed reading attempts. The disadvantages of this method include: the method does not take any processing time into account, and no dynamic adjustment to the current traffic situation in a TCP/IP network is implemented. Another disadvantage of the method include to achieve a good precision, a large load may be placed on the network, caused by the synchronization messages.
Another clock synchronization method is used in the Network Time Protocol (NTP), which is an Internet Standard Recommended Protocol, described in the RFC-1119, RFC-1305 and RFC-2030. For the basic approach to measure the offset of another computer over TCP/IP, NTP is uses substantially the same algorithm as presented in David L. Mills, RFC-2030 Simple Network Time Protocol (SNTP) Version 4 for IPv4, IPv6 and OSI, Network Working Group, October 1996. To save messages, and therefore reduce the network load caused by the update messages, an additional “logical clock” is implemented on the client side. This logical clock controls the local hardware clock, so that high precision can be realized, without many synchronization messages. Although this protocol works well, and high precision can be normally achieved (up to a few tens of milliseconds in global WANs), a major disadvantage of NTP is its slow speed. Based on the experience of the Rutgers University with NTP, it may take up to 30 minutes for the client's clock to synchronize for the first time on a time server. If, in addition, the difference between the two clocks is more than a few minutes, it can take much more time for synchronization to occur for the first time.
Other minor disadvantages of NTP include: the overhead of the NTP-messages, because of security and redundancy features, and the synchronization is typically done on more than one server, which is until now was neither possible nor necessary.
Therefore, a need exists for a system and method for increasing the precision of clock synchronization in distributed systems.